home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / WWW / Charon / Rexx / ShowLinks.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  2000-01-01  |  678 b   |  26 lines

  1. /* Show all links on a page currently opened in AWeb */
  2.  
  3. OPTIONS RESULTS
  4.  
  5. CharonPath = "PathTo:Charon"
  6.  
  7. 'GET URL VAR Curr'
  8. DROP Storage.
  9. 'GET CACHE PATTERN "' || Curr || '" STEM Storage'
  10. 'GETCFG CACHEPATH VAR CachePath'
  11. IF RIGHT(CachePath, 1) ~= ':' THEN CachePath = CachePath || '/'
  12.  
  13. IF Storage.0 > 0 THEN DO
  14.     P = ' ' || ADDRESS() || ' ' || SHOW('P',,)
  15.     IF POS(' CHARON.', P) > 0 THEN charonport = WORD(SUBSTR(P, POS(' CHARON.', P) + 1), 1)
  16.     ELSE DO
  17.         ADDRESS COMMAND
  18.         "Run >NIL: " || CharonPath
  19.         "WaitForPort CHARON.1"
  20.         charonport = 'CHARON.1'
  21.     END
  22.  
  23.     ADDRESS(charonport)
  24.     'HTMLLINKSWINDOW FILE "' || CachePath || Storage.1.File || '" BASEURL "' || Storage.1.URL || '"'
  25. END
  26.